/* ================================== */
/* === GLOBAL STYLES & VARIABLES === */
/* ================================== */

:root {
    --primary-color: #27AE60;
    --secondary-color: #F4F6F6;
    --dark-color: #2C3E50;
    --light-color: #FFFFFF;
    --text-color: #34495E;
    --border-color: #E0E6E6;
    --font-primary: 'Arial', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--secondary-color);
}

html {
    scroll-behavior: smooth;
}

h1, h2, h3 {
    color: var(--dark-color);
    line-height: 1.2;
    margin-bottom: 10px;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
}

p {
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

section {
    padding: 60px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #1e8449; /* Slightly darker green */
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

/* ================================== */
/* === HEADER & NAVIGATION === */
/* ================================== */

header {
    background-color: var(--light-color);
    color: var(--dark-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .logo {
    font-size: 1.8rem;
    font-weight: bold;
}

header nav ul {
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-left: 25px;
}

header nav ul li a {
    color: var(--dark-color);
    font-weight: bold;
    transition: color 0.3s ease;
}

header nav ul li a:hover,
header nav ul li a.active-link {
    color: var(--primary-color);
}

#cart-button {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#cart-button:hover {
    background-color: #1e8449;
}

/* ================================== */
/* === HERO SECTION === */
/* ================================== */

.hero {
    /* Fallback color */
    background-color: var(--dark-color);
    color: var(--light-color);
    height: 80vh; 
    padding: 0 20px;
    position: relative; 
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.65); 
    z-index: 2; 
}

/* Content */
.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.hero-content .motto {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 30px;
    text-transform: capitalize;
    text-shadow: 0 2px 5px rgba(0,0,0,0.4);
    color: #ffffff;
    font-style: italic;
}

/* Carousel */
.hero .main-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; 
}

.hero .swiper-slide {
    width: 100%;
    height: 100%;
}

.hero .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ================================== */
/* === MENU SECTION === */
/* ================================== */

#menu-page {
    background-color: var(--light-color);
}

/* Default to 4 columns on large screens */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.menu-item {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.menu-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.menu-item h4 {
    font-size: 1.2rem;
    padding: 15px 15px 5px 15px;
    margin: 0;
    color: var(--dark-color);
}

.menu-item .price {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    padding: 0 15px 15px 15px;
    margin: 0;
}

.menu-item .add-to-cart-btn {
    display: block;
    width: 100%;
    background-color: var(--dark-color);
    color: var(--light-color);
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: auto; /* Pushes button to bottom */
}

.menu-item .add-to-cart-btn:hover {
    background-color: var(--primary-color);
}

/* ================================== */
/* === ABOUT & FEATURES === */
/* ================================== */

#about {
    text-align: center;
    max-width: 800px;
}

.feature-steps {
    display: flex;
    justify-content: space-around;
    text-align: center;
    gap: 30px;
    margin-top: 40px;
}

.step {
    flex: 1;
}

.step span {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--light-color);
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

/* ================================== */
/* === CONTACT SECTION === */
/* ================================== */

#contact {
    background-color: var(--light-color);
}

.contact-container {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.contact-info, .contact-form {
    flex: 1;
    background: var(--secondary-color);
    padding: 30px;
    border-radius: 8px;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* ================================== */
/* === FOOTER === */
/* ================================== */

footer {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--dark-color);
    color: var(--light-color);
    margin-top: 40px;
}

/* ================================== */
/* === CART MODAL === */
/* ================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
}
.modal-close-btn:hover {
    color: var(--dark-color);
}

#cart-items-container {
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.cart-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    padding: 2px 8px;
    cursor: pointer;
}

.remove-btn {
    background-color: #ffebee;
    color: #c62828;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* ================================== */
/* === BREADCRUMBS === */
/* ================================== */

.breadcrumbs {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 20px 0 20px; 
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumbs li {
    font-size: 0.9rem;
    color: var(--text-color);
}

.breadcrumbs li + li::before {
    content: "/";
    padding: 0 8px;
}

/* ================================== */
/* === MOBILE RESPONSIVENESS === */
/* ================================== */

/* Tablet View (max-width: 1100px) */
@media (max-width: 1100px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile View (max-width: 768px) */
@media (max-width: 768px) {
    
    /* 1. Stack Navigation */
    header {
        flex-direction: column;
        padding: 15px;
    }

    header nav {
        width: 100%;
        margin-top: 15px;
    }

    header nav ul {
        flex-direction: column;
        align-items: center;
        padding: 0;
        gap: 10px;
    }

    header nav ul li {
        margin: 0;
        width: 100%;
        text-align: center;
    }
    
    header nav ul li a {
        display: block;
        padding: 5px 0;
    }

    .cart-button-wrapper {
        margin-top: 15px;
        width: 100%;
    }
    
    #cart-button {
        width: 100%;
    }

    /* 2. Fix Hero Text Size */
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content .motto {
        font-size: 1.1rem;
    }

    /* 3. Stack Contact Form & Info */
    .contact-container {
        flex-direction: column;
    }
    
    /* 4. Stack "How it Works" Steps */
    .feature-steps {
        flex-direction: column;
        gap: 40px;
    }

    /* 5. Menu Grid: 2 Columns on Tablets/Large Phones */
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Phone View (max-width: 500px) */
@media (max-width: 500px) {
    
    /* 1. Menu Grid: 1 Column on Small Phones */
    .menu-grid {
        grid-template-columns: 1fr;
    }

    /* 2. Smaller Headings */
    h2 {
        font-size: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
}